# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test03
# Description:
# Author:       98745
# Date:         2019/4/7
#-------------------------------------------------------------------------------
import re
# pat = "^(13[0-9]|14[5,7,9]|15[^4]|18[0-9]|17[0,1,3,5,6,7,8])\d{8}"
pat="^(13[0-9]|14[5,7]|15[0-3,5-9]|17[0,3,5-8]|18[0-9]|166|198|199|147)\d{8}"
s='18374076786'
m=re.search(pat,s)
if m is not None:
    print('{}匹配成功'.format(m.group()))
else:
    print('{}不匹配'.format(s))